<!--  单个button -->
<template>
  <div class="my-button">
    <el-button type="primary" @click="btnClick">{{ buttonText }}</el-button>
  </div>
</template>

<script setup>
const emits = defineEmits(['btnClick'])
const props = defineProps({
  // button内文字
  buttonText: {
    type: String,
    default: '添加'
  }
})

/**
 * @description 按钮点击事件
 */
const btnClick = () => {
  emits('btnClick')
}
</script>

<style lang="scss" scoped>
.my-button {
  // margin: 10px 0;
  margin-right: 32px;
}
</style>
